password entry: Use text cursor for Caps Lock indicator
authorMatthias Clasen <mclasen@redhat.com>
Thu, 14 Mar 2019 23:17:39 +0000 (19:17 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Thu, 14 Mar 2019 23:17:39 +0000 (19:17 -0400)
We don't want it to appear clickable, but we still
need to keep it pickable for the tooltip to work,
so explicitly give it the same cursor that we use
for the text.

gtk/gtkpasswordentry.c

index ee61d05c59a7b519c8562bf7c3aacbca779a792d..b096b3d578513ff3537dd999ac5e7ef8765e1153 100644 (file)
@@ -118,6 +118,7 @@ gtk_password_entry_init (GtkPasswordEntry *entry)
 
   priv->icon = gtk_image_new_from_icon_name ("caps-lock-symbolic");
   gtk_widget_set_tooltip_text (priv->icon, _("Caps Lock is on"));
+  gtk_widget_set_cursor (priv->icon, gtk_widget_get_cursor (priv->entry));
   gtk_container_add (GTK_CONTAINER (priv->box), priv->icon);
 
   gtk_style_context_add_class (gtk_widget_get_style_context (GTK_WIDGET (entry)), I_("password"));